GLOBAL switch_task
switch_task:
	push esi
	push edi
	push ebx
	push ebp

	;Store esp to current task kstack.
	mov eax, [esp + 24]
	mov [eax], esp

	;Restore esp of next task.
	mov eax, [esp + 20]
	mov esp, [eax]
	pop ebp
	pop ebx
	pop edi
	pop esi
	ret

